/*
* Copyright 2018 Shanxi Lu'an Taihang Laihui Net Tech co.,LTD.
*/
package com.laihuichuxing.factory.method;/**
 * Description:
 *
 * @author: Qinxuefeng
 * @since: 1.0
 * Create Date Time: 2018/12/15 16:12
 * Update Date Time:
 */

import com.laihuichuxing.factory.simple.Operation;
import com.laihuichuxing.factory.simple.OperationAdd;
import com.laihuichuxing.factory.simple.OperationSub;

/**
 * @program: learnmodel
 *
 * @description:
 *
 * @author: QinXueFeng
 *
 * @create: 2018-12-15 16:12
 **/
public interface IFactory {
    Operation createOperation();

}
class AddFactory implements IFactory{

    @Override
    public Operation createOperation() {
        return new OperationAdd();
    }
}
class SubFactory implements IFactory{

    @Override
    public Operation createOperation() {
        return new OperationSub();
    }
}

